<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let p1 = new Promise((resolve, reject) => {
            resolve('成功')
            reject('失败')
        })
        console.log('------p1', p1);
        let p2 = new Promise((resolve, reject) => {
            reject('失败')
            resolve('成功')

        })
        console.log('------p2', p2);

        let p3 = new Promise((resolve, reject) => {
            throw ('报错')
        })
        console.log('p3', p3)
    </script>
</body>

</html>